import { LocalStorage } from "./storage";

const store = new LocalStorage("history", {
    list: []
});

store.addActions({
    async addPhoto(_, body) {
        let list = [body].concat(store.state.list);
        list = list.slice(0, 50);
        store.commit("list", list);
    },
});

export default store;